CLASSES=`./get_source.sh`
LITE_CLASSES=`./get_lite_source.sh`

all: lite

# {{{ full :
full :
	haxe \
		-cp full.src \
		-cp libs \
		-lib feffects \
		-swf-version 9 \
		-swf9 build/ux.swf \
		${CLASSES}
# }}}
# {{{ lite :
lite :
	haxe \
		-cp lite.src \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf9 build/ux.swf \
		${LITE_CLASSES}
# }}}
# {{{ document :
document :
	haxe \
		-xml doc/doc.xml \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf9 build/ux.swf \
		${LITE_CLASSES}
	chxdoc \
		-o doc \
		--title="UX Framework" \
		--footerText="<a href="http://code.google.com/p/ux-framework/">ux-framework - Google Code</a>" \
		-f flash \
		-f haxe \
		-f samples \
		-f jp.ize.iwp \
		--tmpDir=_chxdoctmp \
		--templateDir=doc/templates/default \
		--installTemplate=true \
		--developer=false \
		doc/doc.xml 
# }}}
.PHONY: ring.demo
# {{{ ring.demo:
ring.demo:
	haxe \
		-debug \
		-cp demo \
		-cp full.src/ \
		-cp libs/ \
		-lib feffects \
		-swf-version 10 \
		-swf build/demo.swf \
		-swf-header 800:600:40:000000 \
		-main RingBoxDemo
# }}}
# {{{ samples:
samples: \
	sample.ring sample.line sample.arc sample.ellipse sample.move sample.table \
	sample.selector sample.scene sample.comps
# }}}
# {{{ sample.ring:
sample.ring:
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/ring.swf \
		-swf-header 800:600:40:000000 \
		-main samples.RingBox
# }}}
# {{{ sample.line:
sample.line:
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/line1.swf \
		-swf-header 800:600:40:000000 \
		-main samples.LinearBox1
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/line2.swf \
		-swf-header 800:600:40:000000 \
		-main samples.LinearBox2
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/line3.swf \
		-swf-header 800:600:40:000000 \
		-main samples.LinearBox3
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/line4.swf \
		-swf-header 800:600:40:000000 \
		-main samples.LinearBox4
# }}}
# {{{ sample.arc:
sample.arc:
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/arc1.swf \
		-swf-header 800:600:40:000000 \
		-main samples.ArcBox1
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/arc2.swf \
		-swf-header 800:600:40:000000 \
		-main samples.ArcBox2
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/arc3.swf \
		-swf-header 800:600:40:000000 \
		-main samples.ArcBox3
# }}}
# {{{ sample.ellipse:
sample.ellipse:
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/ellipse1.swf \
		-swf-header 800:600:40:000000 \
		-main samples.EllipseBox1
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/ellipse2.swf \
		-swf-header 800:600:40:000000 \
		-main samples.EllipseBox2
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/ellipse3.swf \
		-swf-header 800:600:40:000000 \
		-main samples.EllipseBox3
# }}}
# {{{ sample.table:
sample.table:
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/table.swf \
		-swf-header 800:600:40:000000 \
		-main samples.Table
# }}}
# {{{ sample.move:
sample.move:
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/move.swf \
		-swf-header 800:600:40:000000 \
		-main samples.Move
# }}}
# {{{sample.selector: 
sample.selector:
	haxe \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-cp libs \
		-swf-version 10 \
		-swf-header 800:600:40:FFFFFF \
		-swf build/samples/selector.swf \
		-main samples.Selector
# }}}
# {{{sample.scene: 
sample.scene:
	haxe \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf-header 800:600:40:FFFFFF \
		-swf build/samples/scene/swf/scene.swf \
		-main samples.Scene
# }}}
# {{{ sample.comps:
sample.comps:
	haxe \
		-debug \
		-cp lite.src/ \
		-cp iwp-runtime.src/ \
		-swf-version 10 \
		-swf build/samples/comps.swf \
		-swf-header 800:600:40:CCCCCC \
		-main samples.Components
# }}}
# {{{ export.iwp-runtime:
export.iwp-runtime:
	svn co http://iwp-runtime.googlecode.com/svn/trunk/src iwp-runtime.src
# }}}
